package com.han.visitor;

/**
 * @ClassName Client
 * @Description 描述该类的功能
 * @Author duoduo Han
 * @Date 2024/6/21 14:17
 */
public class Client {
    public static void main(String[] args) {
        // 创建一个Home对象
        Home home = new Home();
        home.add(new Dog());
        home.add(new Cat());
        //创建主人对象
        Owner owner = new Owner();
        //让主人给宠物喂食
        home.action(owner);
        System.out.println("==============================");
        Someone someone = new Someone();
        home.action(someone);
    }
}
